fix(github-workflows): Fix dependabot options and generation#282
Merged
DecSmith42 merged 3 commits intomainfrom Feb 11, 2026
Merged
fix(github-workflows): Fix dependabot options and generation#282DecSmith42 merged 3 commits intomainfrom
DecSmith42 merged 3 commits intomainfrom
Conversation
Also added a test to ensure functionality.
526b160 to
bb84375
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves Dependabot workflow generation in the GitHub workflows module by updating how Dependabot options are serialized and by adding a verification test to lock in the expected dependabot.yml output (including registries, updates, and update groups).
Changes:
- Updated Dependabot workflow writer to conditionally emit
registriesandupdatessections and to serialize per-update fields (ecosystem, directory, registries, groups, schedule, PR limits). - Made
DependabotUpdate.Registriesoptional (no longerrequired) to allow simpler update definitions. - Added a new
DependabotBuildtest build + verification test and verified output to validate Dependabot YAML generation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| DecSm.Atom.Module.GithubWorkflows/Generation/Options/DependabotOptions.cs | Makes DependabotUpdate.Registries optional to support updates without registries. |
| DecSm.Atom.Module.GithubWorkflows/Generation/DependabotWorkflowWriter.cs | Adjusts Dependabot YAML serialization logic for registries/updates/groups/schedule. |
| DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/WorkflowTests.cs | Adds a Dependabot workflow generation verification test and .github path handling. |
| DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/WorkflowTests.DependabotBuild_GeneratesWorkflow.verified.txt | Adds the approved/verified Dependabot YAML output for snapshot testing. |
| DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/DependabotBuild.cs | Introduces a build definition used by the new Dependabot workflow generation test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DecSm.Atom.Module.GithubWorkflows/Generation/DependabotWorkflowWriter.cs
Outdated
Show resolved
Hide resolved
DecSm.Atom.Module.GithubWorkflows/Generation/DependabotWorkflowWriter.cs
Show resolved
Hide resolved
DecSm.Atom.Module.GithubWorkflows/Generation/DependabotWorkflowWriter.cs
Show resolved
Hide resolved
Updated `DependabotWorkflowWriter` to generate registry types dynamically based on registry configuration. Adjusted tests to verify the change.
Ensured `DependabotWorkflowWriter` correctly skips groups with empty or null patterns during workflow generation. Prevented unnecessary "patterns:" section writing for such cases, improving output clarity.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DecSm.Atom.Module.GithubWorkflows/Generation/DependabotWorkflowWriter.cs
Show resolved
Hide resolved
DecSm.Atom.Module.GithubWorkflows/Generation/DependabotWorkflowWriter.cs
Show resolved
Hide resolved
This was referenced Feb 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also added a test to ensure functionality.
This pull request introduces a new test and workflow generation for Dependabot integration, along with improvements to how Dependabot workflows are written and verified. The main focus is on supporting custom registries, update groups, and more accurate serialization of workflow options.
Dependabot workflow integration and test enhancements:
DependabotBuildclass inDecSm.Atom.Module.GithubWorkflows.Tests/Workflows/DependabotBuild.csto define and generate a Dependabot workflow with custom registries, updates, and groups.DependabotBuild_GeneratesWorkflowinWorkflowTests.csto verify that the Dependabot workflow is generated correctly and matches the expected output.WorkflowTests.DependabotBuild_GeneratesWorkflow.verified.txtto validate the workflow generation, including registries and update groups.Dependabot workflow writer improvements:
DependabotWorkflowWriter.csto ensure registries and updates are only written when present, and improved serialization of update properties such as ecosystem, directory, registries, groups, schedule, and pull request limits. [1] [2] [3]Minor code adjustments:
DependabotUpdaterecord inDependabotOptions.csto makeRegistriesproperty optional instead of required, allowing for more flexible workflow definitions.DependabotDirproperty inWorkflowTests.csfor platform-specific directory handling.